]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Only animate primary view
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 7 Jul 2020 11:06:29 +0000 (13:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 7 Jul 2020 11:41:54 +0000 (13:41 +0200)
Non-primary views always use their monitor's work area for their
geometry, so there's nothing to animate when leaving the overview.

The animation is already limited to the primary view when entering
the overview, so this is also more consistent.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353

js/ui/workspacesView.js

index af767a4346f3423350d2a2b5ad20254e6bf740bf..ea5156836bbb9c62ee4bfbdd6ff6d021e994005e 100644 (file)
@@ -569,14 +569,6 @@ class WorkspacesDisplay extends St.Widget {
 
     animateFromOverview(fadeOnPrimary) {
         for (let i = 0; i < this._workspacesViews.length; i++) {
-            const { x, y, width, height } =
-                Main.layoutManager.getWorkAreaForMonitor(i);
-            this._workspacesViews[i].ease({
-                x, y, width, height,
-                duration: ANIMATION_TIME,
-                mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-            });
-
             let animationType;
             if (fadeOnPrimary && i == this._primaryIndex)
                 animationType = AnimationType.FADE;
@@ -584,6 +576,15 @@ class WorkspacesDisplay extends St.Widget {
                 animationType = AnimationType.ZOOM;
             this._workspacesViews[i].animateFromOverview(animationType);
         }
+
+        const { primaryIndex } = Main.layoutManager;
+        const { x, y, width, height } =
+            Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
+        this._getPrimaryView().ease({
+            x, y, width, height,
+            duration: ANIMATION_TIME,
+            mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+        });
     }
 
     vfunc_hide() {